using Avalonia.Controls;
using Avalonia.Interactivity;
using AvalonAdmin.ViewModels;

namespace AvalonAdmin.Pages;

public partial class About : UserControl
{
    public About()
    {
        InitializeComponent();
    }

    protected override void OnLoaded(RoutedEventArgs e)
    {
        base.OnLoaded(e);
        if (DataContext is AboutViewModel vm)
        {
            var launcher = TopLevel.GetTopLevel(this)?.Launcher;
            vm.Launcher = launcher;
        }
    }
}
